const loading = (option)=>{
	let loading = {
		title: '加载中',
		mask: true
	}
	if(typeof option === 'boolean'&&option===true){
		return loading
	}else if(typeof option === 'string'){
		loading.title = option;
		return loading
	}else if(typeof option === 'object'){
		return Object.assign(loading,option)
	}
	return false
}

const toast = (option)=>{
	let toast = {
		title: '操作成功',
		duration: 2000
	}
	if(typeof option === 'boolean'&&option===true){
		return toast
	}else if(typeof option === 'string'){
		toast.title = option;
		return toast
	}else if(typeof option === 'object'){
		return Object.assign(toast,option)
	}
	return false
}

export {
	loading,
	toast
}